package drds.configuration.db.datasource;

import drds.configuration.db.table_mapping.TableInfo;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class DataSourceIdToDataSourceConfigMapContext {
    public final static ConcurrentHashMap<String, DataSourceContext> dataSourceIdToDataSourceConfigMap = new ConcurrentHashMap<String, DataSourceContext>();
    //
    public final static Map<String, List<TableInfo>> dataSourceIdToTableInfoListMap = new HashMap<String, List<TableInfo>>();

    public final static void put(String key, DataSourceContext dataSourceContext) {
        dataSourceIdToDataSourceConfigMap.put(key, dataSourceContext);
    }

    public final static ConcurrentHashMap<String, DataSourceContext> getDataSourceIdToDataSourceConfigMap() {
        return dataSourceIdToDataSourceConfigMap;
    }

    public final static void put(String key, List<TableInfo> tableInfoList) {
        dataSourceIdToTableInfoListMap.put(key, tableInfoList);
    }

    public final static Map<String, List<TableInfo>> getDataSourceIdToTableInfoListMap() {
        return dataSourceIdToTableInfoListMap;
    }


}
